/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package asteroidmining1;

/**
 *
 * @author IVAN
 */
public class MoveableBall extends Ball {

    private double dx;
    private double dy;

    public MoveableBall(int x, int y, int r,
            double deltax, double deltay) {
        super(x, y, r);
        dx = deltax;
        dy = deltay;
    }

    public void setMotion(double ndx, double ndy) {
        dx = ndx;
        dy = ndy;
    }

    public double xMotion() {
        return dx;
    }

    public double yMotion() {
        return dy;
    }

    public void move() {
        region().translate((int) dx, (int) dy);
    }
}
